package Text;

import java.util.Scanner;

public class MyMath {
    public int div(String x,String y)throws ArithmeticException,NumberFormatException{
        int result=0;
        int a=Integer.parseInt(x);
        int b=Integer.parseInt(y);
        result=a/b;
        return result;
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String x = sc.next();
        String y = sc.next();
        MyMath myMath = new MyMath();
        try {
            System.out.println(myMath.div(x, y));
        } catch (ArithmeticException e) {
            System.out.println("发生了数学异常");
        }catch(NumberFormatException e){
            System.out.println("发生了数字格式异常");
        }
    }
}
